{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 2.3 单位矩阵和逆"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 单位矩阵"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "为了引入矩阵的逆，我们需要先定义单位矩阵：单位矩阵乘以任意一个向量等于这个向量本身。记 $\\mathbf I_n$ 为保持 $n$ 维向量不变的单位矩阵，即：\n",
    "\n",
    "$$\n",
    "\\mathbf I_n \\in \\mathbb R^{n\\times n}, \\forall \\mathbf x \\in \\mathbb R^{n}, \\mathbf I_n \\mathbf{x=x}\n",
    "$$\n",
    "\n",
    "单位矩阵的形式十分简单，所有的对角元素都为 $1$，其他元素都为 $0$，如：\n",
    "\n",
    "$$\n",
    "\\mathbf I_3\n",
    "\\begin{bmatrix}\n",
    "1 & 0 & 0 \\\\\n",
    "0 & 1 & 0 \\\\\n",
    "0 & 0 & 1 \\\\\n",
    "\\end{bmatrix}\n",
    "$$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 矩阵的逆 "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "矩阵 $\\bf A$ 的逆记作 $\\mathbf A^{-1}$，定义为一个矩阵使得\n",
    "\n",
    "$$\n",
    "\\mathbf A^{-1} \\mathbf A = \\mathbf I_n\n",
    "$$\n",
    "\n",
    "如果 $\\mathbf A^{-1}$ 存在，那么线性方程组 $\\bf Ax=b$ 的解为：\n",
    "\n",
    "$$\n",
    "\\mathbf A^{-1}\\mathbf{Ax} = \\mathbf I_n \\mathbf x = \\mathbf x = \\mathbf A^{-1}\\mathbf b\n",
    "$$"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
